package org.codeart.observer.hosue2;

import org.codeart.observer.dto.LotteryResult;

import java.util.Date;

public class LotteryServiceImpl extends LotteryService {
    
    // 注入摇号服务
    private final DrawHouseService drawHouseService = new DrawHouseService();

    @Override
    public LotteryResult lottery(String uid) {
        // 摇号
        String result = drawHouseService.lots(uid);
        
        return new LotteryResult(uid, result, new Date());
    }
}
